//
//  KFDMarketFinanceCalendarTableViewHeader.m
//  
//
//  Created by JIRENTIANXIANG on 6/18/15.
//
//

#import "KFDMarketFinanceCalendarTableViewHeader.h"
#import "ui_config.h"

@implementation KFDMarketFinanceCalendarTableViewHeader

-(instancetype)initWithFrame:(CGRect)frame
{
    if (self=[super initWithFrame:frame]) {
        self.backgroundColor=KFD_WHITE;
    }
    return self;
}

- (void)drawRect:(CGRect)rect {
    CGPoint origin=rect.origin;
    CGSize size=rect.size;
    CGContextRef context=UIGraphicsGetCurrentContext();
    CGPoint points[4]={
        CGPointMake(origin.x, origin.y),
        CGPointMake(origin.x+size.width, origin.y),
        CGPointMake(origin.x, origin.y+size.height),
        CGPointMake(origin.x+size.width, origin.y+size.height)
    };
    CGContextSetStrokeColorWithColor(context, KFDColorRGB(33, 33, 33).CGColor);
    CGContextSetLineWidth(context, 1);
    CGContextStrokeLineSegments(context, points, 4);
}

@end
